<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/12/22 0022
 * Time: 下午 17:13
 */
//服务器端
//第一句话告诉浏览器返回的数据是xml格式，及编码
header("Content-Type: text/xml;charset=utf-8");
//告诉浏览器不要缓存数据
header("Cache-Control: no-cache");

//省
$province=$_POST['province'];
//如何在调试的过程中，看到接收到的数据
file_put_contents("d:/mylog.log",$province."\r\n",FILE_APPEND);

$info="";
if($province=="zhejiang"){
    $info="<province><city>杭州</city><city>温州</city><city>宁波</city></province>";
}elseif($province=="jiangsu"){
    $info="<province><city>南京</city><city>徐州</city><city>苏州</city></province>";
}
echo $info;